﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CartItemSummaryViewModel.cs" company="DST Nexdox">
//   Copyright (c) DST Nexdox. All rights reserved.
// </copyright>
// <summary>
//   Defines the CartItemSummaryViewModel type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace UnityWeb.Models.CartItem
{
  using System;
  using System.Globalization;

  using UnityWeb.Models.Shared;

  public class CartItemSummaryViewModel
  {
    public CartItemSummaryViewModel()
    {
      DocumentWarningsViewModel = new DocumentWarningsViewModel();
    }

    public CartItemSummaryViewModel(Int32 cartItems)
    {
      this.Total = cartItems != 0 ? cartItems.ToString(CultureInfo.InvariantCulture) : String.Empty;

      DocumentWarningsViewModel = new DocumentWarningsViewModel();
    }

    public String Total { get; set; }

    public DocumentWarningsViewModel DocumentWarningsViewModel { get; set; }
  }
}